package com.atguigu.spzx.common.exception;

import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import lombok.Data;

/**
 * @author syh
 * @create 2023-08-14 11:00
 */
@Data
public class GuiguException extends RuntimeException{
    private Integer code;
    private String message;

    public GuiguException(Integer code,String message){
        super(message);
        this.code = code;
        this.message = message;
    }
    public GuiguException(ResultCodeEnum codeEnum){
        super(codeEnum.getMessage());
        this.code = codeEnum.getCode();
        this.message = codeEnum.getMessage();
    }
}
